//
//  HTTripDeattillCommentModel.m
//  HeartTravel
//
//  Created by lanou on 15/10/28.
//  Copyright © 2015年 陈文杰. All rights reserved.
//

#import "HTTripDeattillCommentModel.h"
#import "HTTripDeattillCommentPhotoModel.h"
@implementation HTTripDeattillCommentModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    [super setValue:value forUndefinedKey:key];
    
    if ([key isEqualToString:@"user_data"]) {
        _avatar = value[@"avatar"];
        _user_name = value[@"user_name"];
    }
    
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        _status_photoArr = [NSMutableArray array];
    }
    return self;
}

- (void)setValue:(id)value forKey:(NSString *)key
{
     [super setValue:value forKey:key];
    if ([key isEqualToString:@"status_photo_arr"]) {
        
        for (NSDictionary *photo in value) {
            
            HTTripDeattillCommentPhotoModel *model = [[HTTripDeattillCommentPhotoModel alloc]init];
            
            [model setValuesForKeysWithDictionary:photo];
            [_status_photoArr addObject:model];

        }
    }
}


@end
